package com.sg.controller.pbff;

import com.sg.service.biz.pbff.OffStateService;
import com.sg.dto.biz.pbff.req.*;
import com.sg.dto.biz.pbff.res.*;
import com.sg.common.ro.OkrResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author ：
 * @version 1.0
 * @date ：
 */
@Api(value = "OffState", tags = {"OffState"})
@RestController
// @RequestMapping("/poms/offState/")
public class OffStateController {
    @Autowired
    OffStateService offStateService;

    /**
     * B2-9查询步骤列表（平台）
     * gen by moon at 8/10/2022, 3:42:29 AM
     */
    @PostMapping("/oms/platform/offState/queryStepList")
    @ApiOperation(value = "B2-9查询步骤列表（平台）", response = OkrResult.class)
    public OkrResult<BffQueryStepListRespDto> queryStepList(@RequestBody(required = false) @Validated BffQueryStepListReqDto reqDTO) {
        return OkrResult.success(offStateService.queryStepList(reqDTO));
    }

    /**
     * B3-11修改检查项（平台）
     * gen by moon at 11/15/2022, 11:38:14 PM
     */
    @PostMapping("/oms/platform/offState/updateCheckItem")
    @ApiOperation(value = "B3-11修改检查项（平台）", response = OkrResult.class)
    public OkrResult<BffUpdateCheckItemRespDto> updateCheckItem(@RequestBody(required = false) @Validated BffUpdateCheckItemReqDto reqDTO) {
        return OkrResult.success(offStateService.updateCheckItem(reqDTO));
    }

    /**
     * B3-11新增检查项（平台）
     * gen by moon at 11/15/2022, 11:38:13 PM
     */
    @PostMapping("/oms/platform/offState/addCheckItem")
    @ApiOperation(value = "B3-11新增检查项（平台）", response = OkrResult.class)
    public OkrResult<BffAddCheckItemRespDto> addCheckItem(@RequestBody(required = false) @Validated BffAddCheckItemReqDto reqDTO) {
        return OkrResult.success(offStateService.addCheckItem(reqDTO));
    }

    /**
     * B3-11查询检查项详情（平台）
     * gen by moon at 8/10/2022, 3:42:46 AM
     */
    @PostMapping("/oms/platform/offState/queryCheckItemDetail")
    @ApiOperation(value = "B3-11查询检查项详情（平台）", response = OkrResult.class)
    public OkrResult<BffQueryCheckItemDetailRespDto> queryCheckItemDetail(@RequestBody(required = false) @Validated BffQueryCheckItemDetailReqDto reqDTO) {
        return OkrResult.success(offStateService.queryCheckItemDetail(reqDTO));
    }

    /**
     * B3-11查询检查项列表（平台）
     * gen by moon at 8/10/2022, 3:42:42 AM
     */
    @PostMapping("/oms/platform/offState/queryCheckItemList")
    @ApiOperation(value = "B3-11查询检查项列表（平台）", response = OkrResult.class)
    public OkrResult<BffQueryCheckItemListRespDto> queryCheckItemList(@RequestBody(required = false) @Validated BffQueryCheckItemListReqDto reqDTO) {
        return OkrResult.success(offStateService.queryCheckItemList(reqDTO));
    }

    /**
     * B2-9修改步骤
     * gen by moon at 8/10/2022, 3:42:40 AM
     */
    @PostMapping("/oms/platform/offState/updateStep")
    @ApiOperation(value = "B2-9修改步骤", response = OkrResult.class)
    public OkrResult<BffUpdateStepRespDto> updateStep(@RequestBody(required = false) @Validated BffUpdateStepReqDto reqDTO) {
        return OkrResult.success(offStateService.updateStep(reqDTO));
    }

    /**
     * B2-9新增步骤
     * gen by moon at 8/10/2022, 3:42:37 AM
     */
    @PostMapping("/oms/platform/offState/addStep")
    @ApiOperation(value = "B2-9新增步骤", response = OkrResult.class)
    public OkrResult<BffAddStepRespDto> addStep(@RequestBody(required = false) @Validated BffAddStepReqDto reqDTO) {
        return OkrResult.success(offStateService.addStep(reqDTO));
    }

    /**
     * B2-9查询步骤详情（平台）
     * gen by moon at 8/10/2022, 3:42:33 AM
     */
    @PostMapping("/oms/platform/offState/queryStepDetail")
    @ApiOperation(value = "B2-9查询步骤详情（平台）", response = OkrResult.class)
    public OkrResult<BffQueryStepDetailRespDto> queryStepDetail(@RequestBody(required = false) @Validated BffQueryStepDetailReqDto reqDTO) {
        return OkrResult.success(offStateService.queryStepDetail(reqDTO));
    }

    /**
     * B3查询融合目标检查项父子状态列表(管理)
     * gen by moon at 10/20/2022, 10:07:02 AM
     */
    @PostMapping("/oms/mgt/offState/queryFuseTargetCheckItemNodeStatusList")
    @ApiOperation(value = "B3查询融合目标检查项父子状态列表(管理)", response = OkrResult.class)
    public OkrResult<BffQueryFuseTargetCheckItemNodeStatusListRespDto> queryFuseTargetCheckItemNodeStatusList(@RequestBody(required = false) @Validated BffQueryFuseTargetCheckItemNodeStatusListReqDto reqDTO) {
        return OkrResult.success(offStateService.queryFuseTargetCheckItemNodeStatusList(reqDTO));
    }

}

